﻿#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>2010-08-19 12:01:26Z</CreationDate>
</File>
*/
#endregion

using System.Threading.Tasks;

using Outcoder.LauncherModel.Launchers;

namespace Outcoder.Services
{
	public class MockMarketplaceService : IMarketplaceService
	{
		bool trial = true;

		public bool Trial
		{
			get
			{
				return trial;
			}
			set
			{
				trial = value;
			}
		}

		public string Receipt { get; set; }

#if WINDOWS_UWP || NETFX_CORE
		public Task<string> RegisterAsync()
		{
			MockMarketplaceDetailLauncher task = new MockMarketplaceDetailLauncher();
			task.ShowAsync();

			trial = false;

			return Task.FromResult(Receipt);
		}
#else
		public void Register(string appId = null)
		{
			MockMarketplaceDetailLauncher task = new MockMarketplaceDetailLauncher();
			task.ShowAsync();

			trial = false;
		}
#endif
		public void Review()
		{
			MockMarketplaceReviewLauncher task = new MockMarketplaceReviewLauncher();
			task.ShowAsync();
		}
	}
}
